from Base.Base import Base
from selenium.webdriver.common.by import By
import time



class Page(Base):

    # 点击客户列表页面
    click_user_loc = (By.XPATH, '/html/body/div[1]/div/section/aside/ul/li[2]/ul/li[2]')
    def click_user(self):
        self.click(self.click_user_loc)

    # 点击分页
    click_fenye_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[2]/ul/li[1]')
    def click_fenye(self):
        self.click(self.click_fenye_loc)

    # 输入客户姓名
    send_name_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div/div[1]/div/div/div/div/input')
    def send_name(self, name):
        self.send_keys(self.send_name_loc, name)

    # 点击搜索按钮
    click_button_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/form/div/div[2]/div/div/button[1]/span')
    def click_button(self):
        self.click(self.click_button_loc)




